home *** CD-ROM | disk | FTP | other *** search
/ Sun Solutions 1997 April to September / Sun Solutions CD - APR '97 - SEP '97 (704-3778-12 Rev. H)(Sun Microsystems, Inc.)(1997).iso / products / bin / httpd / Solaris_x86 / killsound.pl < prev    next >
Perl Script  |  1997-02-27  |  2KB  |  76 lines

  1. #!./perl
  2.  
  3. # ------------------------------------------------------------
  4.  
  5. # killdev.pl, by Jean-Pierre Girard (jpg@cdware.eng.sun.com)
  6. # This allows to kill a sound before loading a new html page
  7.  
  8. # ------------------------------------------------------------
  9.  
  10. # Bugs and other fixes
  11.  
  12. # ------------------------------------------------------------
  13.  
  14.  
  15. ##############################################################################
  16. # MAIN PART: Decode the parameters and calls the correct subfunctions
  17. ##############################################################################
  18.  
  19. if (-r "/tmp/httpd/sound.pid") {
  20.     system("kill -9 `cat /tmp/httpd/sound.pid`");
  21. }
  22. $request = $ENV{'QUERY_STRING'};
  23. if ($request =~ /slow/) {
  24.     $~ = HEADER;
  25.     write;
  26.  
  27.     print "<applet code=delay.class width=1 height=1>";
  28.     print "<param name=del value=\"1000\">";
  29.     print "<param name=href value=\"http://localhost:7999/SunSolutions/index4c.html\"></applet>\n";
  30. } else {
  31.     $~ = HEADER;
  32.     write;
  33.  
  34.     print "<applet code=delay.class width=1 height=1>";
  35.     print "<param name=del value=\"1000\">";
  36.     print "<param name=href value=\"http://localhost:7999/SunSolutions/index4x.html\"></applet>\n";
  37. }
  38. ###############################################
  39. format HEADER =
  40. Content-type: text/html
  41.  
  42.  
  43. <title>Sun Solutions CD Welcome Page</title></head>
  44. <body bgcolor=#ffffff>
  45. <p>
  46. <H1><center>
  47.   <p>
  48.   <p>
  49.   <p>
  50.   <p>
  51.  <p>
  52.  <p>
  53.  <p>
  54. <p>
  55. <font color=#0000ff>Welcome to the Sun Solutions CD.</font>
  56.   <p>
  57.   <p>
  58.   <p>
  59.   <p>
  60. <p><h5><font color=#0000ff>Copyright</font> 1996 Sun Microsystems, Inc., 2550 Garcia Ave., Mtn. View, CA 94043 USA.  All rights reserved.</h5>
  61.   <p>
  62. <p><h5>Note: If running as super-user, consult the booklet for instructions.</h5><br>
  63. </center>
  64. </h1>
  65. </body>
  66. </html>
  67. .
  68. #print "Content-type: text/html\n\n<HTML><HEAD><TITLE>KillSound script</TITLE>";
  69.  
  70. #foreach $en (sort keys(%ENV)) {
  71.     #print "$en = $ENV{$en}<br>\n";
  72. #}
  73.  
  74. #print("kill -9 `cat /tmp/devcd/sound.pid`");
  75. # print "<param name=img value=\"file:///tmp/httpd/.products/$disc_name/images/goto_home.gif\">";
  76.